package hg.demo.mock.validator;

import hg.framework.web.response.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/validator")
@RestController
@Slf4j
public class ValidatorController {

    @RequestMapping("/testPhone")
    public R testPhone(@Validated ValiParam valiParam) {
        log.info("testPhone()，测试自定义注解-手机号，valiParam:{}", valiParam);
       return R.ok("验证通过");
    }
}
